<include file="Public/head" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/css/cashier.css" />
<include file="Public/common_header" />
<div class="mian">
    <div class="mianL">
        <include file="Public/sidebar" menu="jybggl.zysh"/>
    </div>
    <div class="mianR">
        <div class="yuyue">
            <ul>
                <li class="yuCurrent" onclick="get_list(1);">待确认</li>
                <li onclick="get_list(2);">通过</li>
                <li onclick="get_list(3);">驳回</li>
                <li onclick="get_list(4);">作废</li>
            </ul>
            <input type="hidden" name="status" value="1" />
        </div>
        <div class="live-seach">
            <form id="searchFrom">
                <ul class="clearfix order-seach">
                    <li>
                        <select name="location_area" id="location_area" class="select_model">
                            <if condition="count($bc_city) gt 1">
                                <option value="">请选择所在地</option>
                            </if>
                            <volist name="bc_city" id="city">
                                <option value="{$key}">{$city}</option>
                            </volist>
                        </select>
                    </li>
                    <li style="margin-right:10px;"><input type="text" name="search_key" value="" placeholder="拍单号/车辆编号" class="car-number1" /></li>
                    <li><input type="text" name="car_plate_number" value="" placeholder="车牌号" /></li>
                    <li><input type="button" value="搜索"  onclick="search();" /></li>
                </ul>
            </form>
        </div>
        <div class="seller-buyer">
            <ul class="clearfix">
                <li class="buyerCurr" onclick="get_sell_buy(1,this)" >买方</li>
                <li onclick="get_sell_buy(2,this)">卖方</li>
            </ul>
            <input type="hidden" name="sell_buy" value="1" />
        </div>
        <div class="listBox">
            
        </div>
        <div class="clear"></div>
        <script>
            get_list(1);
            function get_list(status){
                $('input[name=status]').val(status);
                var sell_buy = $('input[name=sell_buy]').val();
               $.get("/Dispute/getList/seller_buyer/"+sell_buy,{"status":status},function(data){
                   $(".listBox").html(data);
                   $("input").placeholder();
               },"html");
            }
            function get_page(p){
                var sell_buy = $('input[name=sell_buy]').val();
                var status = $('input[name=status]').val();
                var data = $("#searchFrom").serialize() + "&" +encodeURI("p="+p);
                $.get("/Dispute/getList/status/"+status+"/seller_buyer/"+sell_buy,data, function(data){
                    $(".listBox").html(data);
                    $("input").placeholder();
                },"html");
            }
            
            function search(){
                var sell_buy = $('input[name=sell_buy]').val();
                var status = $('input[name=status]').val();
                $.get("/Dispute/getList/status/"+status+"/seller_buyer/"+sell_buy,$("#searchFrom").serialize(),function(data){
                    $(".listBox").html(data);
                    $("input").placeholder();
                },"html");
            }

            function get_sell_buy(st,t){
                $(".seller-buyer ul li").removeClass("buyerCurr");
                $(t).addClass("buyerCurr");
                $('input[name=sell_buy]').val(st);
                var status = $('input[name=status]').val();
                var data = $("#searchFrom").serialize();
                $.get("/Dispute/getList/status/"+status+"/seller_buyer/"+st,data,function(data){
                   $(".listBox").html(data);
                   $("input").placeholder();
                },"html");
            }
        </script>
</body>

</html>
